package com.huoyun.car.service;

import com.huoyun.car.bean.Car;
import com.huoyun.car.bean.DriverSearcher;
import com.huoyun.car.dao.DriverSearcherDao;

public class DriverSearcherServiceImpl implements DriverSearcherService {
	DriverSearcherDao driverSearcherDao;

	public DriverSearcherDao getDriverSearcherDao() {
		return driverSearcherDao;
	}

	public void setDriverSearcherDao(DriverSearcherDao driverSearcherDao) {
		this.driverSearcherDao = driverSearcherDao;
	}

	@Override
	public void saveDriverSearcher(DriverSearcher driverSearcher) {
		// TODO Auto-generated method stub
		driverSearcherDao.saveDriverSearcher(driverSearcher);
	}
	
	public DriverSearcher getLatestDriverSearcherByUserId(long userId) {
		return driverSearcherDao.getLatestDriverSearcherByUserId(userId);
	}
	
	public DriverSearcher getLatestDriverSearcherByCar(Car car) {
		return driverSearcherDao.getLatestDriverSearcherByCar(car);
	}

	@Override
	public void updateDriverSearcherByUserId(DriverSearcher driverSearcher) {
		// TODO Auto-generated method stub
		driverSearcherDao.updateDriverSearcherByUserId(driverSearcher);
	}

	@Override
	public DriverSearcher getDriverSearcherByUserId(long userId) {
		// TODO Auto-generated method stub
		return driverSearcherDao.getDriverSearcherByUseId(userId);
	}
}